export const setToken = (token) => {
	uni.setStorage({
		key: 'TOKEN',
		data: token,
		success() {
			console.log('存取成功')
		}
	})
}
export const getToken = () => {
	return uni.getStorageSync('TOKEN')
}
//移除token
export const removeTken = () => {
	uni.removeStorage({
		key: 'TOKEN',
		success() {
			console.log('移除成功')
		}
	})
}
//保存自定义信息
export const SaveSelfInfo = (info) => {
	uni.setStorage({
		key: 'self',
		data: JSON.stringify(info),
		success() {
			console.log('保存成功')
		}
	})
}
//取出自定义信息
export const GetSelfInfo = () => {
	return uni.getStorageSync('self');
}
//保存用户信息
export const setUserinfo = (info) => {
	uni.setStorage({
		key: 'USER',
		data: JSON.stringify(info),
		success() {
			console.log('保存成功')
		}
	})
}
//取出用户信息
export const getUserinfo = () => {
	return uni.getStorageSync('USER')
}
//移除用户信息
export const removeUserinfo = () => {
	uni.removeStorage({
		key: 'USER',
		success() {
			console.log('移除成功')
		}
	})
}
